import Vue from 'vue'
import Router from 'vue-router'
import Login from './components/Login'
import Admin from './components/Admin.vue'
import Welcome from "./components/admin/Welcome";
import Activity from "./components/admin/Activity";
import Point from "./components/admin/Point";
import Travel from "./components/admin/Travel";
import Category from "./components/admin/Category";
import Organ from "./components/admin/Organ";
import File from "./components/admin/File";
import User from "./components/admin/User";

Vue.use(Router)


export default new Router({
  mode:'history',
  routes:[
    { path:'',redirect:'/login'},
    { path:'/login', component:Login},
    { path:'/',
      component: Admin,
      meta:{
        loginRequire:true
      },
      children: [
        {path:'welcome',component:Welcome},
        {path: 'business/travel',component: Travel},
        {path: 'business/activity',component: Activity},
        {path: 'business/point',component: Point},
        {path: 'business/category',component: Category},
        {path: 'business/organ',component: Organ},
        {path: 'file/file',component: File},
        {path: 'system/user',component: User},
      ]}
  ]
})